﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

public class ProjectService
{
    private static ProjectService instance;

	private ProjectService()
	{

	}

    public static ProjectService getInstance()
    {
        if (instance == null)
        {
            instance = new ProjectService();
        }
        return instance;
    }

    public List<User> getUsersOnProject(int projectId)
    {
        List<User> users = UserFactory.getInstance().getUsersOnProject(projectId);
        return users;
    }

    public List<Task> getTasksForProject(int projectId)
    {
        List<Task> tasks = TaskFactory.getInstance().getTasksForProject(projectId);
        return tasks;
    }

    public void createProject(String name, String category, String description, User creator)
    {
        ProjectFactory.getInstance().createProject(name, category, description, creator.id);
    }
}
